$(document).ready(function() {
  var mySwiper = new Swiper('#swiper1 .swiper-container', {
      // direction: 'vertical', // 垂直切换选项
      observer: true, //修改swiper自己或子元素时，自动初始化swiper
      observeParents: true, //修改swiper的父元素时，自动初始化swiper
      loop: true, // 循环模式选项
      autoHeight: true, //高度随内容变化
      slidesPerView: 1,
      autoplay: {
          delay: 3000,
          stopOnLastSlide: false,
          disableOnInteraction: true,
      },
      // 如果需要分页器
      pagination: {
          el: '#swiper1 .swiper-pagination',
          clickable: true,
      },
      // 如果需要前进后退按钮
      navigation: {
          nextEl: '#swiper1 .swiper-button-next',
          prevEl: '#swiper1 .swiper-button-prev',
      },
      breakpoints: {
        768: {
          slidesPerView: 4,
          slidesPerGroup: 4,
        }
      }
      // 如果需要滚动条
  });
  var mySwiper2 = new Swiper('.swiper2 .swiper-container', {
      // direction: 'vertical', // 垂直切换选项
      observer: true, //修改swiper自己或子元素时，自动初始化swiper
      observeParents: true, //修改swiper的父元素时，自动初始化swiper
      loop: true, // 循环模式选项
      autoHeight: true, //高度随内容变化
      slidesPerView: 1,
      autoplay: {
          delay: 3000,
          stopOnLastSlide: false,
          disableOnInteraction: true,
      },
      // 如果需要分页器
      pagination: {
          el: '.swiper2 .swiper-pagination',
          clickable: true,
      },
      // 如果需要前进后退按钮
      navigation: {
          nextEl: '.swiper2 .swiper-button-next',
          prevEl: '.swiper2 .swiper-button-prev',
      },
      breakpoints: {
        768: {
          slidesPerView: 4,
          slidesPerGroup: 4,
        }
      }
      // 如果需要滚动条
  });
 

  /**/
})